<?php echo $this->Html->script('combos') ?>
<?php echo $this->Html->script('suma') ?>
<?php echo $this->Html->css('order') ?>

<div class="orders form">
    <?php echo $this->Form->create('Order'); ?>
    <fieldset>
        <legend><?php echo __('Orden de Ruta Nueva'); ?></legend>

        <?php
        echo $this->Form->hidden('user_id', array('value' => $this->Session->read('Auth.User.id')));
        echo $this->Form->input('date', array('label' => 'Fecha de Emision', 'type' => 'date', 'dateFormat' => 'DMY'));
        echo $this->Form->input('company_id', array('label' => 'Empresa', 'empty' => 'Seleccionar Empresa'));
        echo $this->Form->input('driver_id', array('label' => 'Chofer', 'empty' => 'Seleccionar Chofer', 'size'=>  sizeof($drivers), 'div'=>'list'));
        echo $this->Form->input('vehicle_id', array('label' => 'Camion', 'empty' => 'Seleccionar Camion', 'size'=>  sizeof($vehicles), 'div'=>'list'));
        echo $this->Form->input('coupled_id', array('label' => 'Acoplado', 'empty' => 'Seleccionar Acoplado', 'size'=>  sizeof($coupleds), 'div'=>'list'));
        echo $this->Form->input('product_id', array('label' => 'Producto', 'empty' => 'Seleccionar Producto', 'size'=>  sizeof($products), 'div'=>'list'));
        echo $this->Form->input('details', array('label' => __('Detalle de la Carga'), 'type' => 'textarea'));
        echo $this->Form->input('origin', array('label' => __('Origen'), 'empty' => 'Ciudad De Origen'));
        echo $this->Form->input('destination', array('label' => __('Destino'), 'empty' => 'Ciudad De Destino'));
        echo $this->Form->input('debit', array('label' => __('Debe ($)'), 'autocomplete' => 'off'));
        echo $this->Form->input('credit', array('label' => __('Haber ($)'), 'autocomplete' => 'off'));
        echo $this->Form->input('total', array('label' => __('Total ($)'), 'readonly' => 'readonly', 'autocomplete' => 'off'));
        ?>




    </fieldset>

    <div class="submit">
        <input name="Guardar" value="Guardar" type="submit">
        <input name="Cancelar" value="Cancelar" type="submit"> 
    </div>

    <?php echo $this->Form->end(); ?>
</div>
<div class="actions">
    <h3><?php echo __('Actions'); ?></h3>
    <ul>

        <li><?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $this->Form->value('Order.id')), null, __('Are you sure you want to delete # %s?', $this->Form->value('Order.id'))); ?></li>
        <li><?php echo $this->Html->link(__('List Orders'), array('action' => 'index')); ?></li>
        <li><?php echo $this->Html->link(__('List Users'), array('controller' => 'users', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New User'), array('controller' => 'users', 'action' => 'add')); ?> </li>
        <li><?php echo $this->Html->link(__('List Companies'), array('controller' => 'companies', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Company'), array('controller' => 'companies', 'action' => 'add')); ?> </li>
        <li><?php echo $this->Html->link(__('List Drivers'), array('controller' => 'drivers', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Driver'), array('controller' => 'drivers', 'action' => 'add')); ?> </li>
        <li><?php echo $this->Html->link(__('List Products'), array('controller' => 'products', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Product'), array('controller' => 'products', 'action' => 'add')); ?> </li>
        <li><?php echo $this->Html->link(__('List Vehicles'), array('controller' => 'vehicles', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Vehicle'), array('controller' => 'vehicles', 'action' => 'add')); ?> </li>
        <li><?php echo $this->Html->link(__('List Coupleds'), array('controller' => 'coupleds', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Coupled'), array('controller' => 'coupleds', 'action' => 'add')); ?> </li>
    </ul>
</div>
